<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app1">
      <h2>{{msg}}</h2>
    </div>
    <div id="app2">
      <h2 :title="currentDate">{{msg}}</h2>
    </div>
    <div id="app2"></div>
    <script src="./js/vue3.js"></script>
    <script>
      const { createApp } = Vue;

      createApp({
        data() {
          return {
            msg: "这是App1中的msg的值",
          };
        },
      }).mount("#app1");

      createApp({
        data() {
          return {
            msg: "这是App2中的msg的值",
            currentDate: "当前日期时间是：" + new Date().toLocaleString(),
          };
        },
      }).mount("#app2");
    </script>
  </body>
</html>
